package jonggyuni.basic;

import java.util.Scanner;

public class J11_Num72 {

	public static void main(String[] args) {
	
		double width, height;
		String color;
		
		Scanner sc = new Scanner(System.in);
		
		System.out.print("가로 세로 색상를 입력하세요 : ");
		width = sc.nextDouble();
		height = sc.nextDouble();
		color = sc.nextLine();
		
		J11Num72 rec = new J11Num72(width, height, color);
		
		System.out.print("면적 : " + rec.getArea()+"  둘레 : "+ rec.getCircum()+ "  색상 : "+ rec.color);
		
		sc.close();
				
		
	}//메인

}//클래스


class J11Num72{
	
	double width=1.0;
	double height=1.0;
	String color="white";
	double area;
	double circum;
	
	public J11Num72(){	}// 기본 생성자
	public J11Num72(double width, double height, String color){ //사용자 정의 생성자
		this.width = width;
		this.height = height;
		this.color = color;
				
	}
	
	double getArea(){ //면적구하는 메서드
		area = width * height;
		return area;
	}
	
	double getCircum(){ //둘레구하는 메서드
		circum = (width+height)*2;
		return circum;
	}
	
}